#!/usr/bin/env node

const fs = require('fs');
const file = process.argv[2] || __filename;

const rs = fs.createReadStream(file);

if(!fs.existsSync(file)){
  console.error('%s not exist',file);
  process.exit(1);
}

if(!fs.statSync(file).isFile()){
  console.error('%s is not file',file);
  process.exit(2);
}

rs.pipe(process.stdout);
